package com.fh.shop.api.product.controller;

import com.fh.shop.api.common.ServerResponse;
import com.fh.shop.api.product.biz.IProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/products")
@Api(tags = "电商前台-商品接口")
public class ProductController {
    @Resource(name = "productService")
    private IProductService productService;

    @GetMapping
    @ApiOperation("获取推荐的新品列表")
    public ServerResponse findList() {
        return productService.findList();
    }
}
